#ifndef BC_WEIR_WATER_DEPTH_HPP
#define BC_WEIR_WATER_DEPTH_HPP

#include "bc_weir_base.hpp"

namespace hms
{

template<typename MeshType>
class Weir_waterdepth : public Weir_base<MeshType>
{
public:
	using BaseType = Weir_base<MeshType>;
	using Type = typename BaseType::Type;
	using BaseType::field;
	using BaseType::patch;
	using BaseType::alpha;
	using BaseType::cp;
	using BaseType::dEdge;
	using BaseType::vField;

public:
	Weir_waterdepth() = default;

	/**
	 * @brief Construct a weir BC for water depth
	 * 
	 * @param d is the water depth field
	 * @param patch is the boundary patch to which the BC is applied
	 * @param slopeParam is either the slope angle alpha [radians] or the pressure factor C_p 
	 * @param isAlpha set to true, if the slope angle is provided as slopeParam,
	 * and false, if the pressure factor is provided
	 */
	Weir_waterdepth(
		Field<MeshType>& d,
		const BoundaryPatch& patch,
		const Field<MeshType>& v,
		scalar alpha
	);

	virtual void update() const override;
};

} // namespace hms


#endif